<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"  
                      "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:p="http://primefaces.org/ui">

<ui:composition
	template="/visao/templates/templateCaixaRecebimento.xhtml">
	<ui:define name="titulo">
		<h:outputText
			value="#{i18n['mov.nome']} #{i18n['receb.mov.impressao']}" />
	</ui:define>

	<ui:define name="content">
		<h:form>
			<p:panel>
				<applet id="appletImpressao"
					archive="http://#{request.serverName}:#{request.serverPort}#{request.contextPath}/applet.jar"
					code="com.triadsystems.applet.Impressao.class"
					style="border: none; left: 35%; position: relative; height: 110px; width: 250px;">
					<param name="paramImpressao"
						value="#{caixaBean.caixaDto.paramCupomApplet}" />
					<param name="paramImpressao2" value="#{caixaBean.caixaDto.recibo}" />
					<param name="paramImpressao3" value="" />
				</applet>

				<p:separator />
				<p:fieldset legend="#{i18n['mov.dados.impressao']}">
					<h:panelGrid columns="2" cellpadding="4" cellspacing="6" style="align:center; width:75%"
						title="#{i18n['receb.mov.formpagamento']}">
						<p:dataTable id="tblPagamentos" var="pagItem" value="#{caixaBean.listaFormasDePagamento}"
							emptyMessage="#{i18n.emptyMessage}" style="width:100%;">
							<p:column headerText="#{i18n['receb.mov.formpagamento']}" style="height:25px">
								<h:outputText value="#{pagItem.tipoPagamento.descricao}" />
							</p:column>
							<p:column headerText="#{i18n['receb.mov.valor']}">
								<h:outputText value="#{pagItem.valor}" converter="doubleConversor" />
							</p:column>
							<p:column headerText="#{i18n['receb.mov.status']}">
								<p:graphicImage value="#{pagItem.statusPagamento.urlImagem}"
									style="#{pagItem.statusPagamento.cssImage}" />
								<h:outputText value="#{pagItem.statusPagamento.status}"
									style="#{pagItem.statusPagamento.css}" />
							</p:column>
						</p:dataTable>
	
						<p:panel>
							<h:panelGrid columns="2" cellpadding="6" cellspacing="10">
								<h:outputText value="#{caixaBean.statusTroco.tipoSaldo}:" 
									 style="#{caixaBean.statusTroco.cssSaldo}; font-size:22px ;"  />
								<h:outputText  value="#{caixaBean.caixaDto.troco}" converter="doubleConversor"
									 style="#{caixaBean.statusTroco.cssSaldo}; font-size:22px ;" />
							</h:panelGrid>
						</p:panel>
					</h:panelGrid>
				</p:fieldset>
				<p:spacer height="20"/>
			</p:panel>
			
			<h:panelGrid cellpadding="3" cellspacing="3">
				<p:commandButton id="retornaRecebimento"
					value="#{i18n['receb.mov.voltaRecebimento']}"
					onclick="retorna.show()" type="button" icon="ui-icon-circle-arrow-w"/>
			</h:panelGrid>
			
			<p:confirmDialog id="confirmDialog" appendToBody="true"
				message="#{i18n['mov.dados.confirmimpressao']}"
				header="#{i18n['popup.excluir.header']}" severity="alert"
				widgetVar="retorna">

				<p:commandButton value="#{i18n['receb.mov.voltaRecebimento']}"
					action="#{caixaBean.doVoltarRecebimento}" icon="ui-icon-circle-arrow-w"
					id="voltar" title="#{i18n['receb.mov.voltaRecebimento']}" />
			</p:confirmDialog>
		</h:form>
	</ui:define>
</ui:composition>
</html>